﻿using Domain;
using IDal;
using Infrastructure;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebAPI.Controllers
{

    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        private readonly IService service;

        public ValuesController(IService service)
        {
            this.service = service;
        }

        [HttpPost]
        public async Task<int> Add() 
        {
            return await service.Add();
        }


        [HttpPost]
        public async Task<int> AddMap()
        {
            return await service.AddMap();
        }
       



        [HttpPost]
        public async Task<int> AddRole()
        {
            return await service.AddRole();
        }

        [HttpPost]
        public async Task<int> AddUPdate()
        {
            return await service.AddUPdate();
        }


        [HttpPost]
        public async Task<int> UserDel()
        {
            return await service.UserDel();
        }


        [HttpGet]
        public async Task<IEnumerable<T_User>> t_User()
        {
            return await service.t_User();
        }



    }
}
